<HTML><HEAD><TITLE>var_inc_violations(?X, +Delta)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(tentative)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>var_inc_violations(?X, +Delta)</H1>
Increment X's violation count by Delta
<DL>
<DT><EM>X</EM></DT>
<DD>A a tentative variable
</DD>
<DT><EM>Delta</EM></DT>
<DD>A number
</DD>
</DL>
<H2>Description</H2>

	Increment X's violation count by Delta. X should be a variable with
	a tentative value. The initial violation count for every variable is 0.
	<P>
	Calling var_inc_violations/2 on a nonvariable has no effect and
	silently succeeds.
    
<H3>Modes and Determinism</H3><UL>
<LI>var_inc_violations(?, +) is semidet
</UL>
<H3>Fail Conditions</H3>
Fails if X is a variable without tentative value
<H2>Examples</H2>
<PRE>
    ?- tent_set(X, 27), var_inc_violations(X, 3).
    X = X{27 -&gt; 3}
    Yes (0.00s cpu)

    ?- tent_set(X, 27), var_inc_violations(X, 3), var_inc_violations(X, 1).
    X = X{27 -&gt; 4}
    Yes (0.00s cpu)

    ?- tent_set(X, 27), var_inc_violations(X, 3), var_inc_violations(X, -1).
    X = X{27 -&gt; 2}
    Yes (0.00s cpu)

    ?- var_inc_violations(foo, 3).
    Yes (0.00s cpu)

    ?- var_inc_violations(_, 3).
    No (0.00s cpu)
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/tentative/tent_set-2.html">tent_set / 2</A>, <A HREF="../../lib/tentative/has_tent_value-1.html">has_tent_value / 1</A>, <A HREF="../../lib/tentative/tent_get-2.html">tent_get / 2</A>, <A HREF="../../lib/tentative/var_get_violations-2.html">var_get_violations / 2</A>
</BODY></HTML>
